<script setup>
import { ref } from "vue";
const props = defineProps(["name"]);

let str;

if(import.meta.env.DEV){
  str = "./public/components/IconSvg/";
}else{
  str = './components/IconSvg/'
}

const href = ref(str + props.name + ".svg#" + props.name);
</script>

<template>
  <svg>
    <use :href="href" />
  </svg>
</template>

<style lang="scss" scoped>
  svg {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
</style>
